package com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList;

import android.content.Context;

import com.nickstumpos.android.GmailWidgetPlus.R;
import com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList.options.AccountOptionList;
import com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList.options.ConfigurableOptions;
import com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList.options.LabelsOptionList;
import com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList.options.ShowAllOptionList;
import com.nickstumpos.android.GmailWidgetPlus.Configure.OptionsList.options.SkinsOptionList;
import com.nickstumpos.android.GmailWidgetPlus.widget.sizes.WidgetSize;

public class OptionFactory {

	public static OptionsList createOptionsList(final Context context,
			final ConfigurableOptions type,
			final int widgetId,
			final WidgetSize size) {

		OptionsList ret = null;
		switch (type) {
			case ACCOUNT:
				ret = new AccountOptionList(context,
						widgetId,
						context.getString(R.string.choose_account));
				break;
			case SHOW_ALL:
				ret = new ShowAllOptionList(context,
						widgetId,
						context.getString(R.string.show_all_labels_));
				break;
			case SKINS:
				ret = new SkinsOptionList(context,
						widgetId,
						context.getString(R.string.choose_a_skin),
						size);
				break;
			case LABELS:
				ret = new LabelsOptionList(context,
						widgetId,
						context.getString(R.string.select_labels_to_blacklist));
				break;
		}
		return ret;
	}
}
